<div class="container">
<body>
    <h2>Admin Digital Content</h2>    
<div class="row">
<?php 
if(isset($_REQUEST['result'])) {
	if($_REQUEST['result'] == 1)
		print '<h4 style="color:green">Item Added Successfully</h4>';
	else
		print '<h4 style="color:red">Error Adding Item</h4>';
}
?>
<label>Add Digital content</label>
<div class="form-group">
	 <div class="col-lg-6">
       <form action="adminDigitalContent/addDigitalContent" method="post" enctype="multipart/form-data" >
            <div class="form-group">
				<label>Title (EN)</label>
                <input type="text" name="title_en" value="" class="form-control" />
            </div>
            
            <div class="form-group">
				<label>Keywords (EN)</label>
                <input type="text" name="keywords_en" value="" class="form-control" />
            </div>
            
            <div class="form-group">
				<label>Historical Importance (EN)</label>
                <input type="text" name="historical_importance_en" value="" class="form-control" />
            </div>
            
            <div class="form-group">
				<label>Tags (EN)</label>
                <input type="text" name="tags_en" value="" class="form-control" />
            </div>
            
            <div class="form-group">
				<label>Map Geo Lat</label>
                <input type="text" name="geo_lat" value="" class="form-control" />
            </div>
			 <div class="form-group">
			    <label>Category</label>
			    <select class="form-control" name="category_id">
			        <?php 
					foreach( $categories as $category )
					{
					?>
					<option value="<?php print $category->category_id;?>"><?php print $category->name_en;?></option>
					<?php 
					}
					?>
			    </select>
			</div>
			<div class="form-group">
				<button name="submit_add_DigitalContent" value="submit" type="submit" class="btn btn-default">Add Digital Content Item</button>
			</div>
     </div>
     <div class="col-lg-6">
			<div class="form-group">
				<label>Title (AR)</label>
                <input type="text" name="title_ar" value="" class="form-control" />
            </div> 
            <div class="form-group">
				<label>Keywords (AR)</label>
                <input type="text" name="keywords_ar" value="" class="form-control" />
            </div>  
            <div class="form-group">
				<label>Historical Importance (AR)</label>
                <input type="text" name="historical_importance_ar" value="" class="form-control" />
            </div>
            <div class="form-group">
				<label>Tags (AR)</label>
                <input type="text" name="tags_ar" value="" class="form-control" />
            </div>
            <div class="form-group">
				<label>Map Geo Lon</label>
                <input type="text" name="geo_lon" value="" class="form-control" />
            </div>
            <div class="form-group">
				<label>Upload Image</label>
                <input type="file" name="image">
            </div>
     </div>
     </form>
</div>
<div class="row">
	<div class="col-lg-12">
	<hr>
		<h2>Digital contents</h2>
		<div class="table-responsive">
			<table class="table table-bordered table-hover table-striped">
				<thead>
					<tr>
						<th>ID</th>
						<th>title</th>
						<th>title</th>
						<th>keywords</th>
						<th>keywords</th>
						<th>Historical Importance</th>
						<th>Historical Importance</th>
						<th>tags</th>
						<th>tags</th>
						<th>geo_lat</th>
						<th>geo_ion</th>
						<th>Edit</th>
						
						
					</tr>
				</thead>
				<tbody>
			
				<?php
			foreach($digitalContents as $digitalcontent) {
			//echo $digitalcontent->digital_content_id;
				?> 
				
					<tr class="active">
					    <td><?php if (isset($digitalcontent->digital_content_id)) echo htmlspecialchars($digitalcontent->digital_content_id, ENT_QUOTES, 'UTF-8'); ?></td>
						<td><?php if (isset($digitalcontent->title_en)) echo htmlspecialchars($digitalcontent->title_en, ENT_QUOTES, 'UTF-8'); ?></td>
		    		    <td><?php if (isset($digitalcontent->title_ar)) echo htmlspecialchars($digitalcontent->title_ar, ENT_QUOTES, 'UTF-8'); ?></td>
		    		    <td><?php if (isset($digitalcontent->keywords_en)) echo htmlspecialchars($digitalcontent->keywords_en, ENT_QUOTES, 'UTF-8'); ?></td>
						<td><?php if (isset($digitalcontent->keywords_ar)) echo htmlspecialchars($digitalcontent->keywords_ar, ENT_QUOTES, 'UTF-8'); ?></td>
						<td><?php if (isset($digitalcontent->historical_importance_en)) echo htmlspecialchars($digitalcontent->historical_importance_en, ENT_QUOTES, 'UTF-8'); ?></td>
						<td><?php if (isset($digitalcontent->historical_importance_ar)) echo htmlspecialchars($digitalcontent->historical_importance_ar, ENT_QUOTES, 'UTF-8'); ?></td>
						<td><?php if (isset($digitalcontent->tags_en)) echo htmlspecialchars($digitalcontent->tags_en, ENT_QUOTES, 'UTF-8'); ?></td>	
                        <td><?php if (isset($digitalcontent->tags_ar)) echo htmlspecialchars($digitalcontent->tags_ar, ENT_QUOTES, 'UTF-8'); ?></td>	
                        <td><?php if (isset($digitalcontent->geo_lat)) echo htmlspecialchars($digitalcontent->geo_lat, ENT_QUOTES, 'UTF-8'); ?></td>
						<td><?php if (isset($digitalcontent->geo_lon)) echo htmlspecialchars($digitalcontent->geo_lon, ENT_QUOTES, 'UTF-8'); ?></td>	
				         <td><a href="<?php echo URL . 'adminDigitalContent/editDigitalContent/' . htmlspecialchars($digitalcontent->digital_content_id, ENT_QUOTES, 'UTF-8'); ?>">edit</a></td>
			           <td><a href="<?php echo URL . 'adminDigitalContent/deleteDigitalContent/' . htmlspecialchars($digitalcontent->digital_content_id, ENT_QUOTES, 'UTF-8'); ?>">delete</a></td></tr>
                    
					</tr>
					
			<?php
			}
			?>
				</tbody>
			</table>
		</div>
	</div>
	
</div>
	
	
	
	</body>
   
</div>
